package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpContractsQuoterDashDiscPageUtil extends SeleniumPageUtil {
	public final static By CQD_TD_TITLE = By.xpath("//*[@id='Panel0']/table/tbody/tr/td[4]");
	public final static By CQD_FILTER_ESCALATE = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[5]/div/img[1]");
	public final static By CQD_FILTER_DATE = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[6]/div/img[1]");
	public final static By CQD_FILTER_REASON = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[7]/div/img[1]");
	public final static By CQD_FILTER_ITEM_ID = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[8]/div/img[1]");
	public final static By CQD_FILTER_ITEM_ID_MOD = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[9]/div/img[1]");
	public final static By CQD_FILTER_DESC = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[10]/div/img[1]");
	public final static By CQD_FILTER_ERIAL_NUM = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[11]/div/img[1]");
	public final static By CQD_FILTER_SERIAL_NUM_MOD = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[12]/div/img[1]");
	public final static By CQD_FILTER_START = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[13]/div/img[1]");
	public final static By CQD_FILTER_ADDRESS = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[14]/div/img[1]");
	public final static By CQD_FILTER_SLA = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[15]/div/img[1]");
	public final static By CQD_FILTER_NODE_NAME = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[16]/div/img[1]");
	public final static By CQD_FILTER_SOURCE = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[17]/div/img[1]");
	public final static By CQD_FILTER_CREATEBY = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[18]/div/img[1]");
	public final static By CQD_FILTER_CREATE_DATE = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[19]/div/img[1]");
	public final static By CQD_FILTER_ESCALATEBY = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[20]/div/img[1]");
	public final static By CQD_FILTER_ESCALATE_DATE = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[21]/div/img[1]");
	
	public final static By CQD_TD_ESCALATE = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[5]");
	public final static By CQD_TD_DATE = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[6]");
	public final static By CQD_TD_REASON = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[7]");
	public final static By CQD_TD_ITEM_ID = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[8]");
	public final static By CQD_TD_ITEM_ID_MOD = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[9]");
	public final static By CQD_TD_ITEM_DESC = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[10]");
	public final static By CQD_TD_SERIAL_NUM = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[11]");
	public final static By CQD_TD_SERIAL_NUM_MOD = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[12]");
	public final static By CQD_TD_START = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[13]");
	public final static By CQD_TD_ADDRESS = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[14]");
	public final static By CQD_TD_SLA = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[15]");
	public final static By CQD_TD_NODE_NAME = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[16]");
	public final static By CQD_TD_SOURCE = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[17]");
	public final static By CQD_TD_CREATEBY = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[18]");
	public final static By CQD_TD_CREATE_DATE = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[19]");
	public final static By CQD_TD_ESCALATEBY = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[20]");
	public final static By CQD_TD_ESCALATE_DATE = By.xpath("//*[@id='QuoteLineDiscreps1_ajaxTbl']/tbody/tr[2]/td[21]");
	
	public static void enter(){
		SpContractsQuoterPageUtil.enter();
		SpContractsQuoterPageUtil.displayHidenMenus(new By[]{SpContractsQuoterPageUtil.STQ_LINK_DASH});
		SeleniumUtil.waitOnElements(new By[]{SpContractsQuoterPageUtil.STQ_LINK_DASH_ITEMNOTADD});
		SeleniumUtil.click(SeleniumUtil.getCachedElement(SpContractsQuoterPageUtil.STQ_LINK_DASH_ITEMNOTADD));
		SeleniumUtil.waitForFixedMilliseconds(1000);
		waitForPageToLoad();
	}

	private static void waitForPageToLoad() {
		SeleniumUtil.selectDefaultContent();
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_CONTENT_NAME);
		SeleniumUtil.waitOnElements(new By[]{
				CQD_TD_TITLE,CQD_TD_ESCALATE_DATE
		});
	}
}
